//
//  UIImageView+WQExtension.m
//  MeterCircle
//
//  Created by 魏强 on 16/6/15.
//  Copyright © 2016年 魏强. All rights reserved.
//

#import "UIImageView+WQExtension.h"

#import "UIImageView+WebCache.h"
#import "UIImage+WQExtension.h"
@implementation UIImageView (WQExtension)

- (void)setHeaderWithUrl:(NSString *)url placeholderStr:(NSString *)placeholderStr
{
    UIImage *placeholder = [[UIImage imageNamed:placeholderStr] circleImage];
    [self sd_setImageWithURL:[NSURL URLWithString:url] placeholderImage:placeholder completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) {
        self.image = image ? [image circleImage] : placeholder;
    }];
}
@end
